<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>织蝶云 - OA+PM+CRM一站式企业应用管理平台</title>

    <!-- 小图标 -->
    <link rel="shortcut icon" href="./images/favicon/favicon.ico" type="image/x-icon">
    <!-- 清除样式 -->
    <link rel="stylesheet" href="./css/resets.css">
    <!-- bootstrap的css包 -->
    <link rel="stylesheet" href="./lib/bootstrap_4/css/bootstrap.min.css">
    <!-- 模板样式css -->
    <link rel="stylesheet" href="./css/lcs_resumeadd.css">
    <!-- 清除样式 -->
    <link rel="stylesheet" href="./css/resets.css">
    <!-- 引入字体图标css -->
    <link rel="stylesheet" href="./css/iconfont/lyd_approval/iconfont.css">
    <!--  -->
    <link rel="stylesheet" href="./css/iconfont/lcs_resume/iconfont.css">
</head>

<body>
    <div class="left_nav">
        <div class="logo">
            <a href="/tmeplate">
                <img src="./images/lyd/lyd_approval_frame_logo-left.png" alt="织蝶云">
            </a>
        </div>
        <div class="left_nav_menu">
            <ul class="left_nav_menu_nav">
                <li class="btn-block">
                    <a href="/page">
                        <i class="iconfont icon-home"></i>
                        <span>主页</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/mange">
                        <i class="iconfont icon-list"></i>
                        <span>项目</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/lyd_approval">
                        <i class="iconfont icon-suitcase"></i>
                        <span>审批</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/gy-CRM">
                        <i class="iconfont icon-users"></i>
                        <span>CRM</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="javascript:;">
                        <i class="iconfont icon-calendar"></i>
                        <span>日程</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="javascript:;">
                        <i class="iconfont icon-tasks"></i>
                        <span>报告</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/lyj_knowledge">
                        <i class="iconfont icon-book"></i>
                        <span>知识</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/document">
                        <i class="iconfont icon-columns"></i>
                        <span>文档</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/resume">
                        <i class="iconfont icon-male"></i>
                        <span>简历</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="javascript:;">
                        <i class="iconfont icon-tupian"></i>
                        <span>相册</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="javascript:;">
                        <i class="iconfont icon-bull-horn-announcer"></i>
                        <span>公告</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="javascript:;">
                        <i class="iconfont icon-gavel"></i>
                        <span>考勤</span>
                    </a>
                </li>
                <li class="btn-block">
                    <a href="/yyl_system">
                        <i class="iconfont icon-cogs"></i>
                        <span>系统</span>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <div class="top_nav_box">
        <div class="top_nav">
            <a class="toggle-btn">
                <i class="iconfont icon-bars"></i>
            </a>
            <div class="top_center">
                <a href="/resume" class="btn btn-all actives">全部简历</a>
                <a href="/rudang" class="btn btn-all">入档</a>
                <a href="/mianshi" class="btn btn-all">通知面试</a>
                <a href="/luyong" class="btn btn-all">录用</a>
                <a href="/noluyong" class="btn btn-all">不录用</a>
                <a href="/weiyue" class="btn btn-all">违约</a>
            </div>
            <div class="top_right">
                <ul class="top_right_info">
                    <li>
                        <a href="javascript:;" class="btn info_icon">
                            <i class="iconfont icon-envelope-o"></i>
                        </a>
                        <!-- 管理内容 -->
                        <div class="nav_switch_off right_nav">
                            <h5>你有0条信息</h5>
                            <ul>
                                <li>目前还没有最新消息</li>
                                <li>
                                    <a href="javascript:;">查看更多</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li class="admi_btn">
                        <a href="javascript:;" class="admi">
                            <img src="./images/lyd/6.jpg" alt="管理员">
                            管理员
                            <span class="iconfont icon-caret-bottom"></span>
                        </a>
                        <ul class="nav_switch_no amid_menu nav_switch_off">
                            <li><a href="javascript:;"><i class="iconfont icon-user"></i>个人主页</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-cog"></i>基本资料</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-camera"></i>更换头像</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-cog"></i>更换密码</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-list"></i>我的任务</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-magnet"></i>升级为付费版</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-tasks"></i>订单</a></li>
                            <li><a href="javascript:;"><i class="iconfont icon-comments"></i>聊天</a></li>
                            <li><a href="/outlogin"><i class="iconfont icon-SignOut"></i>退出</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
        <div class="content-box">
            <div class="content">
                <div class="content_top clearfix">
                    <!-- 上面左边 -->
                    <p class="jianjia"><span class="xjt iconfont icon-fangxiangyuanjiantou-xiangxia"></span>添加简历</p>
                    <!-- 上面右边 -->
                    <div class="content_top_right">
                        <a href="/resume">
                            <button class="btn_cha"><span class="jtz iconfont icon-jiantouzuo"></span></span>返回</button>
                        </a>

                    </div>
                </div>
                <div class="content_bottom">
                    <div class="content_bottom_a">

                        <form class="form-add">
                            <div class="form_group">
                                <label for="txtname"><i>*</i> 职位名称</label>
                                <input type="text" name="job" placeholder="请输入职位名称，如产品经理" class="input" />
                                <span class="job">请输入职位名称</span>
                                <span class="job-two">您输入职位名称格式不对</span>
                            </div>
                            <div class="form_group">
                                <label for="txtpswd"><i>*</i> 姓名</label>
                                <input type="text" name="name" placeholder="请输入姓名" class="input" />
                                <span class="name">请输入姓名</span>
                                <span class="name-two">您输入姓名格式不对</span>
                            </div>
                            <div class="form_group">
                                <label for="txtpswd"><i>*</i> 手机</label>
                                <input type="text" name="phone" placeholder="请输入手机号" class="input" />
                                <span class="phone">请输入手机号</span>
                                <span class="phone-two">您输入手机号格式不对</span>
                            </div>
                            <div class="form_group">
                                <label for="txtpswd">性别</label>
                                <input type="radio" name="sex" id="" class="radio" checked value="1">男&nbsp;&nbsp;&nbsp;&nbsp;<input
                                    type="radio" name="sex" id="" class="radio" value="2">女
                            </div>
                            <div class="form_group">
                                <label for="txtpswd">生日</label>
                                <input type="text" name="birth" id="test1" placeholder="出生日期" class="input" />
                            </div>

                            <div class="form_group">
                                <label for="txtpswd">学历</label>
                                <!-- <input type="text" name="education" placeholder="请选择学历" class="input" /> -->
                                <select name="education" id="" class="input">
                                    <!-- <option>请选择学历</option> -->
                                    <option>小学</option>
                                    <option>中专</option>
                                    <option>初中</option>
                                    <option>高中</option>
                                    <option>技校</option>
                                    <option>大专</option>
                                    <option>本科</option>
                                    <option>硕士</option>
                                    <option>博士</option>
                                    <option>博士后</option>
                                </select>
                            </div>
                            <div class="form_group">
                                <label for="txtpswd">工作年限</label>
                                <!-- <input type="text" name="working" placeholder="请选择工作年限" class="input" /> -->
                                <select name="working" id="" class="input">
                                    <!-- <option>请选择工作年限</option> -->
                                    <option>应届毕业生</option>
                                    <option>1年以下</option>
                                    <option>1-2年</option>
                                    <option>3-5年</option>
                                    <option>6-7年</option>
                                    <option>8-10年</option>
                                    <option>10年以上</option>
                                </select>
                            </div>
                            <div class="form_group">

                                <label for="txtpswd" class="beizhu">备注</label>
                                <textarea name="remarks" id="" cols="200" rows="10"></textarea>
                            </div>
                            <div class="form_group">
                                <label for="txtpswd">简历附件</label>
                                <input type="file" class="files" name="resume" />
                                <span class="file">选择文件</span>
                            </div>
                            <div class="form_group">
                                <label for="txtpswd">状态：</label>
                                <input type="radio" name="status" id="" checked class="radio" value="1">入档&nbsp;&nbsp;&nbsp;&nbsp;<input
                                    type="radio" name="status" id="" class="radio" value="2">通知面试

                                <input type="radio" name="status" id="" class="radio" value="4">录用
                                <input type="radio" name="status" id="" class="radio" value="5">不录用
                                <input type="radio" name="status" id="" class="radio" value="3">违约
                            </div>
                            <div class="form_group">
                                <input type="hidden" name="">
                                <button type="button" class="btn-submit">提交保存</button>
                            </div>
                        </form>

                    </div>
                    <div class="bottom_a">
                        <p class="bottom_wenzi">
                            <i class="bottom_wen"> 2020 © by 织蝶云系统 · <i>
                                    织蝶云手册 · 翌羽信息科技(上海)有限公司 版权所有
                        </p>
                    </div>

                </div>
            </div>

        </div>
    </div>

    <!-- 引入jquery -->
    <script src="./lib/jquery/jquery.min.js"> </script> <!-- 引入bootstrap的js -->
    <script src="./lib/bootstrap_4/js/bootstrap.bundle.min.js"></script>
    <script src="./lib/bootstrap_4/js/bootstrap.min.js"></script>
    <!-- 模板样式js -->
    <script src="./js/template.js"></script>
    <!-- 引入字体图标js -->
    <script src="./js/iconfont/lyd_approval/iconfont.js"></script>
    <script src="./lib/layDate-v5.0.9/laydate/laydate.js"></script>
    <script>
        // 日历插件 
        laydate.render({
            elem: '#test1'
        })
    </script>

    <script>

        // 添加用户
        // 点击提交按钮
        $('.btn-submit').on('click', function () {
            // 获取职位名称
            let job = $('.form_group input[name="job"]').val();
            // 正则
            let jobs = /^[\u4e00-\u9fa5]+$/.test(job);

            // 姓名
            let name = $('.form_group input[name="name"]').val();
            // 正则
            let names = /^[\u4e00-\u9fa5]+$/.test(name);

            // 手机号
            let phone = $('.form_group input[name="phone"]').val();
            // 正则
            let phones = /^1(3|4|5|7|8)\d{9}$/.test(phone);

            //判断有没有输入值 或 没有 输入对

            // 如果职位名称 手机号 姓名都没有 输入对话框时 提示一下
            if (job == '' && name == '' && phone == '') {
                alert('请输入内容');
                // 先隐藏内容
                $('.job-two').hide();
                $('.name-two').hide();
                $('.phone-two').hide();
                // 判断是否为空
                !job ? $('.job').show() : $('.job').hide();
                !name ? $('.name').show() : $('.name').hide();
                !phone ? $('.phone').show() : $('.phone').hide();
            } else {
                // 先隐藏内容
                $('.job').hide();
                $('.name').hide();
                $('.phone').hide();
                // 判断是否正确
                !jobs ? $('.job-two').show() : $('.job-two').hide();
                !names ? $('.name-two').show() : $('.name-two').hide();
                !phones ? $('.phone-two').show() : $('.phone-two').hide();
            };
            // 获取表单数据
            let formData = $('.form-add').serialize();
            if (jobs != '' && names != '' && phones != '') {
                // ajax
                $.ajax({
                    type: 'post',
                    url: '/resumeadds',
                    data: formData,
                    success: function (data) {
                        if (data.code == "0") {
                            // show();
                            location.href = ('/resume');
                            alert('添加成功');
                        }
                    }
                })
            }

        })
    </script>
</body>

</html>